﻿
Imports System.Data.SqlClient
Public Class FormSearch
 
    Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged


        FormMain.DgLoadEmployee.DataSource = Cmd.ExecuteDataTable("SELECT *FROM TBL_EMPLOYEE E JOIN  TBL_DEGREE D ON D.DEGREE_ID=E.DEGREE_ID JOIN TBL_POSITION P ON P.POSITION_ID=E.POSITION_ID JOIN TBL_SEX S ON S.SEX_ID=E.SEX_ID JOIN TBL_ADDRESS A ON A.ADDRESS_ID=E.ADDRESS_ID WHERE E.ACTIVE=1 AND E.EMP_NAME  LIKE '%" & TextBox1.Text & "%' OR E.PHONE  LIKE '%" & TextBox1.Text & "%' ")



        'FormMain.LoadEmployee()
    End Sub

    Private Sub FormSearch_FormClosed(sender As Object, e As FormClosedEventArgs) Handles Me.FormClosed
        FormMain.RanMumber = 0
    End Sub

    
 
End Class